package top.fullj.remoting.consumer;

import com.google.common.base.MoreObjects;

/**
 * @author bruce.wu
 * @since 2022/2/14 15:57
 */
public class ServiceConfig {

    private final String name;

    private final String uri;

    private final long timeout;

    public ServiceConfig(String name, String uri, long timeout) {
        this.name = name;
        this.uri = uri;
        this.timeout = timeout;
    }

    public String getName() {
        return name;
    }

    public String getUri() {
        return uri;
    }

    public long getTimeout() {
        return timeout;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .omitNullValues()
                .add("name", name)
                .add("uri", uri)
                .add("timeout", timeout)
                .toString();
    }
}
